{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Processing ../sweepai/api_test.py\n",
      "../sweepai/api_test.py unittest\n",
      "../sweepai/api_test.py unittest\n",
      "../sweepai/api_test.py api\n",
      "Processing ../sweepai/__init__.py\n",
      "Processing ../sweepai/watch.py\n",
      "../sweepai/watch.py datetime\n",
      "../sweepai/watch.py os\n",
      "../sweepai/watch.py pickle\n",
      "../sweepai/watch.py threading\n",
      "../sweepai/watch.py time\n",
      "../sweepai/watch.py chain\n",
      "../sweepai/watch.py islice\n",
      "../sweepai/watch.py Github\n",
      "../sweepai/watch.py Event\n",
      "../sweepai/watch.py IssueEvent\n",
      "../sweepai/watch.py Repository\n",
      "../sweepai/watch.py print\n",
      "../sweepai/watch.py handle_request\n",
      "../sweepai/watch.py logger\n",
      "Processing ../sweepai/api.py\n",
      "../sweepai/api.py annotations\n",
      "../sweepai/api.py ctypes\n",
      "../sweepai/api.py json\n",
      "../sweepai/api.py threading\n",
      "../sweepai/api.py time\n",
      "../sweepai/api.py Optional\n",
      "../sweepai/api.py requests\n",
      "../sweepai/api.py Body\n",
      "../sweepai/api.py Depends\n",
      "../sweepai/api.py FastAPI\n",
      "../sweepai/api.py Header\n",
      "../sweepai/api.py HTTPException\n",
      "../sweepai/api.py Path\n",
      "../sweepai/api.py Security\n",
      "../sweepai/api.py status\n",
      "../sweepai/api.py HTMLResponse\n",
      "../sweepai/api.py HTTPAuthorizationCredentials\n",
      "../sweepai/api.py HTTPBearer\n",
      "../sweepai/api.py Commit\n",
      "../sweepai/api.py Context\n",
      "../sweepai/api.py Hatchet\n",
      "../sweepai/api.py Instrumentator\n",
      "../sweepai/api.py DEFAULT_RULES\n",
      "../sweepai/api.py RESTART_SWEEP_BUTTON\n",
      "../sweepai/api.py REVERT_CHANGED_FILES_TITLE\n",
      "../sweepai/api.py RULES_LABEL\n",
      "../sweepai/api.py RULES_TITLE\n",
      "../sweepai/api.py SWEEP_BAD_FEEDBACK\n",
      "../sweepai/api.py SWEEP_GOOD_FEEDBACK\n",
      "../sweepai/api.py SweepConfig\n",
      "../sweepai/api.py get_gha_enabled\n",
      "../sweepai/api.py get_rules\n",
      "../sweepai/api.py DISCORD_FEEDBACK_WEBHOOK_URL\n",
      "../sweepai/api.py ENV\n",
      "../sweepai/api.py GHA_AUTOFIX_ENABLED\n",
      "../sweepai/api.py GITHUB_BOT_USERNAME\n",
      "../sweepai/api.py GITHUB_LABEL_COLOR\n",
      "../sweepai/api.py GITHUB_LABEL_DESCRIPTION\n",
      "../sweepai/api.py GITHUB_LABEL_NAME\n",
      "../sweepai/api.py IS_SELF_HOSTED\n",
      "../sweepai/api.py MERGE_CONFLICT_ENABLED\n",
      "../sweepai/api.py PRChangeRequest\n",
      "../sweepai/api.py global_threads\n",
      "../sweepai/api.py add_config_to_top_repos\n",
      "../sweepai/api.py create_gha_pr\n",
      "../sweepai/api.py handle_button_click\n",
      "../sweepai/api.py clean_logs\n",
      "../sweepai/api.py download_logs\n",
      "../sweepai/api.py on_check_suite\n",
      "../sweepai/api.py on_comment\n",
      "../sweepai/api.py on_merge\n",
      "../sweepai/api.py on_merge_conflict\n",
      "../sweepai/api.py on_ticket\n",
      "../sweepai/api.py make_pr\n",
      "../sweepai/api.py stack_pr\n",
      "../sweepai/api.py Button\n",
      "../sweepai/api.py ButtonList\n",
      "../sweepai/api.py check_button_activated\n",
      "../sweepai/api.py check_button_title_match\n",
      "../sweepai/api.py ChatLogger\n",
      "../sweepai/api.py logger\n",
      "../sweepai/api.py posthog\n",
      "../sweepai/api.py get_github_client\n",
      "../sweepai/api.py TicketProgress\n",
      "../sweepai/api.py SafePriorityQueue\n",
      "../sweepai/api.py BOT_SUFFIX\n",
      "../sweepai/api.py get_hash\n",
      "../sweepai/api.py CheckRunCompleted\n",
      "../sweepai/api.py CommentCreatedRequest\n",
      "../sweepai/api.py InstallationCreatedRequest\n",
      "../sweepai/api.py IssueCommentRequest\n",
      "../sweepai/api.py IssueRequest\n",
      "../sweepai/api.py PREdited\n",
      "../sweepai/api.py PRRequest\n",
      "../sweepai/api.py ReposAddedRequest\n",
      "../sweepai/api.py health_check\n",
      "Processing ../sweepai/global_threads.py\n",
      "Processing ../sweepai/handlers/on_merge_conflict.py\n",
      "../sweepai/handlers/on_merge_conflict.py time\n",
      "../sweepai/handlers/on_merge_conflict.py traceback\n",
      "../sweepai/handlers/on_merge_conflict.py GitCommandError\n",
      "../sweepai/handlers/on_merge_conflict.py PullRequest\n",
      "../sweepai/handlers/on_merge_conflict.py logger\n",
      "../sweepai/handlers/on_merge_conflict.py OPENAI_USE_3_5_MODEL_ONLY\n",
      "../sweepai/handlers/on_merge_conflict.py PROGRESS_BASE_URL\n",
      "../sweepai/handlers/on_merge_conflict.py entities\n",
      "../sweepai/handlers/on_merge_conflict.py FileChangeRequest\n",
      "../sweepai/handlers/on_merge_conflict.py SweepBot\n",
      "../sweepai/handlers/on_merge_conflict.py create_pr_changes\n",
      "../sweepai/handlers/on_merge_conflict.py get_branch_diff_text\n",
      "../sweepai/handlers/on_merge_conflict.py sweeping_gif\n",
      "../sweepai/handlers/on_merge_conflict.py ChatLogger\n",
      "../sweepai/handlers/on_merge_conflict.py discord_log_error\n",
      "../sweepai/handlers/on_merge_conflict.py generate_diff\n",
      "../sweepai/handlers/on_merge_conflict.py posthog\n",
      "../sweepai/handlers/on_merge_conflict.py ClonedRepo\n",
      "../sweepai/handlers/on_merge_conflict.py get_github_client\n",
      "../sweepai/handlers/on_merge_conflict.py PaymentContext\n",
      "../sweepai/handlers/on_merge_conflict.py TicketContext\n",
      "../sweepai/handlers/on_merge_conflict.py TicketProgress\n",
      "../sweepai/handlers/on_merge_conflict.py TicketProgressStatus\n",
      "../sweepai/handlers/on_merge_conflict.py HumanMessagePrompt\n",
      "../sweepai/handlers/on_merge_conflict.py to_branch_name\n",
      "../sweepai/handlers/on_merge_conflict.py center\n",
      "Processing ../sweepai/handlers/__init__.py\n",
      "Processing ../sweepai/handlers/on_review.py\n",
      "../sweepai/handlers/on_review.py logger\n",
      "Processing ../sweepai/handlers/on_merge.py\n",
      "../sweepai/handlers/on_merge.py time\n",
      "../sweepai/handlers/on_merge.py SweepConfig\n",
      "../sweepai/handlers/on_merge.py get_blocked_dirs\n",
      "../sweepai/handlers/on_merge.py get_rules\n",
      "../sweepai/handlers/on_merge.py PostMerge\n",
      "../sweepai/handlers/on_merge.py make_pr\n",
      "../sweepai/handlers/on_merge.py logger\n",
      "../sweepai/handlers/on_merge.py ChatLogger\n",
      "../sweepai/handlers/on_merge.py posthog\n",
      "../sweepai/handlers/on_merge.py get_github_client\n",
      "Processing ../sweepai/handlers/stack_pr_test.py\n",
      "../sweepai/handlers/stack_pr_test.py unittest\n",
      "../sweepai/handlers/stack_pr_test.py unittest\n",
      "../sweepai/handlers/stack_pr_test.py stack_pr\n",
      "Processing ../sweepai/handlers/on_ticket.py\n",
      "../sweepai/handlers/on_ticket.py difflib\n",
      "../sweepai/handlers/on_ticket.py os\n",
      "../sweepai/handlers/on_ticket.py re\n",
      "../sweepai/handlers/on_ticket.py traceback\n",
      "../sweepai/handlers/on_ticket.py time\n",
      "../sweepai/handlers/on_ticket.py markdown\n",
      "../sweepai/handlers/on_ticket.py openai\n",
      "../sweepai/handlers/on_ticket.py yaml\n",
      "../sweepai/handlers/on_ticket.py yamllint\n",
      "../sweepai/handlers/on_ticket.py BadCredentialsException\n",
      "../sweepai/handlers/on_ticket.py Issue\n",
      "../sweepai/handlers/on_ticket.py PullRequest\n",
      "../sweepai/handlers/on_ticket.py LogtailContext\n",
      "../sweepai/handlers/on_ticket.py LogtailHandler\n",
      "../sweepai/handlers/on_ticket.py logger\n",
      "../sweepai/handlers/on_ticket.py tabulate\n",
      "../sweepai/handlers/on_ticket.py tqdm\n",
      "../sweepai/handlers/on_ticket.py linter\n",
      "../sweepai/handlers/on_ticket.py PRDescriptionBot\n",
      "../sweepai/handlers/on_ticket.py DEFAULT_RULES\n",
      "../sweepai/handlers/on_ticket.py RESET_FILE\n",
      "../sweepai/handlers/on_ticket.py RESTART_SWEEP_BUTTON\n",
      "../sweepai/handlers/on_ticket.py REVERT_CHANGED_FILES_TITLE\n",
      "../sweepai/handlers/on_ticket.py RULES_LABEL\n",
      "../sweepai/handlers/on_ticket.py RULES_TITLE\n",
      "../sweepai/handlers/on_ticket.py SWEEP_BAD_FEEDBACK\n",
      "../sweepai/handlers/on_ticket.py SWEEP_GOOD_FEEDBACK\n",
      "../sweepai/handlers/on_ticket.py SweepConfig\n",
      "../sweepai/handlers/on_ticket.py get_documentation_dict\n",
      "../sweepai/handlers/on_ticket.py get_rules\n",
      "../sweepai/handlers/on_ticket.py DISCORD_FEEDBACK_WEBHOOK_URL\n",
      "../sweepai/handlers/on_ticket.py ENV\n",
      "../sweepai/handlers/on_ticket.py GITHUB_BOT_USERNAME\n",
      "../sweepai/handlers/on_ticket.py GITHUB_LABEL_NAME\n",
      "../sweepai/handlers/on_ticket.py IS_SELF_HOSTED\n",
      "../sweepai/handlers/on_ticket.py LOGTAIL_SOURCE_KEY\n",
      "../sweepai/handlers/on_ticket.py MONGODB_URI\n",
      "../sweepai/handlers/on_ticket.py OPENAI_USE_3_5_MODEL_ONLY\n",
      "../sweepai/handlers/on_ticket.py PROGRESS_BASE_URL\n",
      "../sweepai/handlers/on_ticket.py AssistantRaisedException\n",
      "../sweepai/handlers/on_ticket.py FileChangeRequest\n",
      "../sweepai/handlers/on_ticket.py MaxTokensExceeded\n",
      "../sweepai/handlers/on_ticket.py NoFilesException\n",
      "../sweepai/handlers/on_ticket.py ProposedIssue\n",
      "../sweepai/handlers/on_ticket.py PullRequest\n",
      "../sweepai/handlers/on_ticket.py SandboxResponse\n",
      "../sweepai/handlers/on_ticket.py create_error_logs\n",
      "../sweepai/handlers/on_ticket.py ExternalSearcher\n",
      "../sweepai/handlers/on_ticket.py PRReader\n",
      "../sweepai/handlers/on_ticket.py SweepBot\n",
      "../sweepai/handlers/on_ticket.py create_config_pr\n",
      "../sweepai/handlers/on_ticket.py create_pr_changes\n",
      "../sweepai/handlers/on_ticket.py safe_delete_sweep_branch\n",
      "../sweepai/handlers/on_ticket.py Button\n",
      "../sweepai/handlers/on_ticket.py ButtonList\n",
      "../sweepai/handlers/on_ticket.py create_action_buttons\n",
      "../sweepai/handlers/on_ticket.py ChatLogger\n",
      "../sweepai/handlers/on_ticket.py generate_diff\n",
      "../sweepai/handlers/on_ticket.py posthog\n",
      "../sweepai/handlers/on_ticket.py ClonedRepo\n",
      "../sweepai/handlers/on_ticket.py get_github_client\n",
      "../sweepai/handlers/on_ticket.py AssistantConversation\n",
      "../sweepai/handlers/on_ticket.py PaymentContext\n",
      "../sweepai/handlers/on_ticket.py TicketContext\n",
      "../sweepai/handlers/on_ticket.py TicketProgress\n",
      "../sweepai/handlers/on_ticket.py TicketProgressStatus\n",
      "../sweepai/handlers/on_ticket.py HumanMessagePrompt\n",
      "../sweepai/handlers/on_ticket.py BOT_SUFFIX\n",
      "../sweepai/handlers/on_ticket.py UPDATES_MESSAGE\n",
      "../sweepai/handlers/on_ticket.py blockquote\n",
      "../sweepai/handlers/on_ticket.py bot_suffix\n",
      "../sweepai/handlers/on_ticket.py checkbox_template\n",
      "../sweepai/handlers/on_ticket.py clean_logs\n",
      "../sweepai/handlers/on_ticket.py collapsible_template\n",
      "../sweepai/handlers/on_ticket.py create_checkbox\n",
      "../sweepai/handlers/on_ticket.py create_collapsible\n",
      "../sweepai/handlers/on_ticket.py discord_suffix\n",
      "../sweepai/handlers/on_ticket.py format_sandbox_success\n",
      "../sweepai/handlers/on_ticket.py get_hash\n",
      "../sweepai/handlers/on_ticket.py sep\n",
      "../sweepai/handlers/on_ticket.py stars_suffix\n",
      "../sweepai/handlers/on_ticket.py strip_sweep\n",
      "../sweepai/handlers/on_ticket.py to_branch_name\n",
      "../sweepai/handlers/on_ticket.py center\n",
      "../sweepai/handlers/on_ticket.py fetch_relevant_files\n",
      "../sweepai/handlers/on_ticket.py fire_and_forget_wrapper\n",
      "../sweepai/handlers/on_ticket.py log_error\n",
      "../sweepai/handlers/on_ticket.py UserSettings\n",
      "../sweepai/handlers/on_ticket.py sleep\n",
      "Processing ../sweepai/handlers/on_button_click_test.py\n",
      "../sweepai/handlers/on_button_click_test.py Mock\n",
      "../sweepai/handlers/on_button_click_test.py patch\n",
      "../sweepai/handlers/on_button_click_test.py handle_button_click\n",
      "Processing ../sweepai/handlers/on_button_click.py\n",
      "../sweepai/handlers/on_button_click.py hashlib\n",
      "../sweepai/handlers/on_button_click.py time\n",
      "../sweepai/handlers/on_button_click.py Repository\n",
      "../sweepai/handlers/on_button_click.py logger\n",
      "../sweepai/handlers/on_button_click.py RESET_FILE\n",
      "../sweepai/handlers/on_button_click.py REVERT_CHANGED_FILES_TITLE\n",
      "../sweepai/handlers/on_button_click.py RULES_LABEL\n",
      "../sweepai/handlers/on_button_click.py RULES_TITLE\n",
      "../sweepai/handlers/on_button_click.py get_blocked_dirs\n",
      "../sweepai/handlers/on_button_click.py MONGODB_URI\n",
      "../sweepai/handlers/on_button_click.py PostMerge\n",
      "../sweepai/handlers/on_button_click.py comparison_to_diff\n",
      "../sweepai/handlers/on_button_click.py stack_pr\n",
      "../sweepai/handlers/on_button_click.py ButtonList\n",
      "../sweepai/handlers/on_button_click.py check_button_title_match\n",
      "../sweepai/handlers/on_button_click.py ChatLogger\n",
      "../sweepai/handlers/on_button_click.py posthog\n",
      "../sweepai/handlers/on_button_click.py get_github_client\n",
      "../sweepai/handlers/on_button_click.py BOT_SUFFIX\n",
      "../sweepai/handlers/on_button_click.py IssueCommentRequest\n",
      "Processing ../sweepai/handlers/create_pr.py\n",
      "../sweepai/handlers/create_pr.py datetime\n",
      "../sweepai/handlers/create_pr.py Any\n",
      "../sweepai/handlers/create_pr.py Generator\n",
      "../sweepai/handlers/create_pr.py openai\n",
      "../sweepai/handlers/create_pr.py Repository\n",
      "../sweepai/handlers/create_pr.py logger\n",
      "../sweepai/handlers/create_pr.py DEFAULT_RULES_STRING\n",
      "../sweepai/handlers/create_pr.py SweepConfig\n",
      "../sweepai/handlers/create_pr.py get_blocked_dirs\n",
      "../sweepai/handlers/create_pr.py ENV\n",
      "../sweepai/handlers/create_pr.py GITHUB_BOT_USERNAME\n",
      "../sweepai/handlers/create_pr.py GITHUB_CONFIG_BRANCH\n",
      "../sweepai/handlers/create_pr.py GITHUB_DEFAULT_CONFIG\n",
      "../sweepai/handlers/create_pr.py GITHUB_LABEL_NAME\n",
      "../sweepai/handlers/create_pr.py MONGODB_URI\n",
      "../sweepai/handlers/create_pr.py FileChangeRequest\n",
      "../sweepai/handlers/create_pr.py MaxTokensExceeded\n",
      "../sweepai/handlers/create_pr.py MockPR\n",
      "../sweepai/handlers/create_pr.py PullRequest\n",
      "../sweepai/handlers/create_pr.py SweepBot\n",
      "../sweepai/handlers/create_pr.py ChatLogger\n",
      "../sweepai/handlers/create_pr.py posthog\n",
      "../sweepai/handlers/create_pr.py ClonedRepo\n",
      "../sweepai/handlers/create_pr.py get_github_client\n",
      "../sweepai/handlers/create_pr.py UPDATES_MESSAGE\n",
      "Processing ../sweepai/handlers/on_comment.py\n",
      "../sweepai/handlers/on_comment.py re\n",
      "../sweepai/handlers/on_comment.py time\n",
      "../sweepai/handlers/on_comment.py traceback\n",
      "../sweepai/handlers/on_comment.py Any\n",
      "../sweepai/handlers/on_comment.py LogtailHandler\n",
      "../sweepai/handlers/on_comment.py logger\n",
      "../sweepai/handlers/on_comment.py tabulate\n",
      "../sweepai/handlers/on_comment.py get_blocked_dirs\n",
      "../sweepai/handlers/on_comment.py get_documentation_dict\n",
      "../sweepai/handlers/on_comment.py DEFAULT_GPT4_32K_MODEL\n",
      "../sweepai/handlers/on_comment.py DEFAULT_GPT35_MODEL\n",
      "../sweepai/handlers/on_comment.py ENV\n",
      "../sweepai/handlers/on_comment.py GITHUB_BOT_USERNAME\n",
      "../sweepai/handlers/on_comment.py LOGTAIL_SOURCE_KEY\n",
      "../sweepai/handlers/on_comment.py MONGODB_URI\n",
      "../sweepai/handlers/on_comment.py get_relevant_context\n",
      "../sweepai/handlers/on_comment.py FileChangeRequest\n",
      "../sweepai/handlers/on_comment.py MockPR\n",
      "../sweepai/handlers/on_comment.py NoFilesException\n",
      "../sweepai/handlers/on_comment.py SweepBot\n",
      "../sweepai/handlers/on_comment.py get_pr_diffs\n",
      "../sweepai/handlers/on_comment.py ChatLogger\n",
      "../sweepai/handlers/on_comment.py posthog\n",
      "../sweepai/handlers/on_comment.py ClonedRepo\n",
      "../sweepai/handlers/on_comment.py get_github_client\n",
      "../sweepai/handlers/on_comment.py TicketProgress\n",
      "../sweepai/handlers/on_comment.py HumanMessageCommentPrompt\n",
      "../sweepai/handlers/on_comment.py BOT_SUFFIX\n",
      "../sweepai/handlers/on_comment.py fire_and_forget_wrapper\n",
      "../sweepai/handlers/on_comment.py prep_snippets\n",
      "Processing ../sweepai/handlers/pr_utils.py\n",
      "../sweepai/handlers/pr_utils.py logger\n",
      "../sweepai/handlers/pr_utils.py RESET_FILE\n",
      "../sweepai/handlers/pr_utils.py REVERT_CHANGED_FILES_TITLE\n",
      "../sweepai/handlers/pr_utils.py SWEEP_BAD_FEEDBACK\n",
      "../sweepai/handlers/pr_utils.py SWEEP_GOOD_FEEDBACK\n",
      "../sweepai/handlers/pr_utils.py SweepConfig\n",
      "../sweepai/handlers/pr_utils.py get_documentation_dict\n",
      "../sweepai/handlers/pr_utils.py DISCORD_FEEDBACK_WEBHOOK_URL\n",
      "../sweepai/handlers/pr_utils.py get_relevant_context\n",
      "../sweepai/handlers/pr_utils.py NoFilesException\n",
      "../sweepai/handlers/pr_utils.py SandboxResponse\n",
      "../sweepai/handlers/pr_utils.py ExternalSearcher\n",
      "../sweepai/handlers/pr_utils.py SweepBot\n",
      "../sweepai/handlers/pr_utils.py GITHUB_LABEL_NAME\n",
      "../sweepai/handlers/pr_utils.py create_pr_changes\n",
      "../sweepai/handlers/pr_utils.py Button\n",
      "../sweepai/handlers/pr_utils.py ButtonList\n",
      "../sweepai/handlers/pr_utils.py create_action_buttons\n",
      "../sweepai/handlers/pr_utils.py ChatLogger\n",
      "../sweepai/handlers/pr_utils.py posthog\n",
      "../sweepai/handlers/pr_utils.py ClonedRepo\n",
      "../sweepai/handlers/pr_utils.py get_github_client\n",
      "../sweepai/handlers/pr_utils.py HumanMessagePrompt\n",
      "../sweepai/handlers/pr_utils.py prep_snippets\n",
      "Processing ../sweepai/handlers/stack_pr.py\n",
      "../sweepai/handlers/stack_pr.py time\n",
      "../sweepai/handlers/stack_pr.py traceback\n",
      "../sweepai/handlers/stack_pr.py PullRequest\n",
      "../sweepai/handlers/stack_pr.py logger\n",
      "../sweepai/handlers/stack_pr.py PRDescriptionBot\n",
      "../sweepai/handlers/stack_pr.py PROGRESS_BASE_URL\n",
      "../sweepai/handlers/stack_pr.py entities\n",
      "../sweepai/handlers/stack_pr.py SweepBot\n",
      "../sweepai/handlers/stack_pr.py create_pr_changes\n",
      "../sweepai/handlers/stack_pr.py get_branch_diff_text\n",
      "../sweepai/handlers/stack_pr.py sweeping_gif\n",
      "../sweepai/handlers/stack_pr.py ChatLogger\n",
      "../sweepai/handlers/stack_pr.py discord_log_error\n",
      "../sweepai/handlers/stack_pr.py posthog\n",
      "../sweepai/handlers/stack_pr.py ClonedRepo\n",
      "../sweepai/handlers/stack_pr.py get_github_client\n",
      "../sweepai/handlers/stack_pr.py TicketContext\n",
      "../sweepai/handlers/stack_pr.py TicketProgress\n",
      "../sweepai/handlers/stack_pr.py TicketProgressStatus\n",
      "../sweepai/handlers/stack_pr.py HumanMessagePrompt\n",
      "../sweepai/handlers/stack_pr.py blockquote\n",
      "../sweepai/handlers/stack_pr.py to_branch_name\n",
      "../sweepai/handlers/stack_pr.py center\n",
      "../sweepai/handlers/stack_pr.py fetch_relevant_files\n",
      "Processing ../sweepai/handlers/on_check_suite.py\n",
      "../sweepai/handlers/on_check_suite.py io\n",
      "../sweepai/handlers/on_check_suite.py re\n",
      "../sweepai/handlers/on_check_suite.py time\n",
      "../sweepai/handlers/on_check_suite.py zipfile\n",
      "../sweepai/handlers/on_check_suite.py requests\n",
      "../sweepai/handlers/on_check_suite.py get_gha_enabled\n",
      "../sweepai/handlers/on_check_suite.py PRChangeRequest\n",
      "../sweepai/handlers/on_check_suite.py get_github_client\n",
      "../sweepai/handlers/on_check_suite.py get_token\n",
      "../sweepai/handlers/on_check_suite.py CheckRunCompleted\n",
      "Processing ../sweepai/core/__init__.py\n",
      "Processing ../sweepai/core/sweep_bot.py\n",
      "../sweepai/core/sweep_bot.py copy\n",
      "../sweepai/core/sweep_bot.py re\n",
      "../sweepai/core/sweep_bot.py time\n",
      "../sweepai/core/sweep_bot.py traceback\n",
      "../sweepai/core/sweep_bot.py OrderedDict\n",
      "../sweepai/core/sweep_bot.py Dict\n",
      "../sweepai/core/sweep_bot.py Generator\n",
      "../sweepai/core/sweep_bot.py ContentFile\n",
      "../sweepai/core/sweep_bot.py GithubException\n",
      "../sweepai/core/sweep_bot.py UnknownObjectException\n",
      "../sweepai/core/sweep_bot.py Repository\n",
      "../sweepai/core/sweep_bot.py logger\n",
      "../sweepai/core/sweep_bot.py BaseModel\n",
      "../sweepai/core/sweep_bot.py ExtractLeftoverComments\n",
      "../sweepai/core/sweep_bot.py modify_file\n",
      "../sweepai/core/sweep_bot.py SweepConfig\n",
      "../sweepai/core/sweep_bot.py get_blocked_dirs\n",
      "../sweepai/core/sweep_bot.py get_branch_name_config\n",
      "../sweepai/core/sweep_bot.py DEBUG\n",
      "../sweepai/core/sweep_bot.py DEFAULT_GPT4_32K_MODEL\n",
      "../sweepai/core/sweep_bot.py DEFAULT_GPT35_MODEL\n",
      "../sweepai/core/sweep_bot.py ChatGPT\n",
      "../sweepai/core/sweep_bot.py AssistantRaisedException\n",
      "../sweepai/core/sweep_bot.py FileChangeRequest\n",
      "../sweepai/core/sweep_bot.py FileCreation\n",
      "../sweepai/core/sweep_bot.py MaxTokensExceeded\n",
      "../sweepai/core/sweep_bot.py Message\n",
      "../sweepai/core/sweep_bot.py NoFilesException\n",
      "../sweepai/core/sweep_bot.py ProposedIssue\n",
      "../sweepai/core/sweep_bot.py PullRequest\n",
      "../sweepai/core/sweep_bot.py RegexMatchError\n",
      "../sweepai/core/sweep_bot.py SandboxResponse\n",
      "../sweepai/core/sweep_bot.py Snippet\n",
      "../sweepai/core/sweep_bot.py create_file_prompt\n",
      "../sweepai/core/sweep_bot.py files_to_change_prompt\n",
      "../sweepai/core/sweep_bot.py pull_request_prompt\n",
      "../sweepai/core/sweep_bot.py sandbox_files_to_change_prompt\n",
      "../sweepai/core/sweep_bot.py subissues_prompt\n",
      "../sweepai/core/sweep_bot.py add_auto_imports\n",
      "../sweepai/core/sweep_bot.py discord_log_error\n",
      "../sweepai/core/sweep_bot.py format_contents\n",
      "../sweepai/core/sweep_bot.py generate_diff\n",
      "../sweepai/core/sweep_bot.py is_markdown\n",
      "../sweepai/core/sweep_bot.py AssistantAPIMessage\n",
      "../sweepai/core/sweep_bot.py AssistantConversation\n",
      "../sweepai/core/sweep_bot.py TicketProgress\n",
      "../sweepai/core/sweep_bot.py get_hash\n",
      "../sweepai/core/sweep_bot.py check_syntax\n",
      "../sweepai/core/sweep_bot.py chunk_code\n",
      "Processing ../sweepai/core/context_pruning.py\n",
      "../sweepai/core/context_pruning.py json\n",
      "../sweepai/core/context_pruning.py re\n",
      "../sweepai/core/context_pruning.py textwrap\n",
      "../sweepai/core/context_pruning.py time\n",
      "../sweepai/core/context_pruning.py openai\n",
      "../sweepai/core/context_pruning.py dataclass\n",
      "../sweepai/core/context_pruning.py logger\n",
      "../sweepai/core/context_pruning.py AzureOpenAI\n",
      "../sweepai/core/context_pruning.py OpenAI\n",
      "../sweepai/core/context_pruning.py Thread\n",
      "../sweepai/core/context_pruning.py Run\n",
      "../sweepai/core/context_pruning.py MAX_CHARS\n",
      "../sweepai/core/context_pruning.py client\n",
      "../sweepai/core/context_pruning.py openai_retry_with_timeout\n",
      "../sweepai/core/context_pruning.py AZURE_API_KEY\n",
      "../sweepai/core/context_pruning.py AZURE_OPENAI_DEPLOYMENT\n",
      "../sweepai/core/context_pruning.py DEFAULT_GPT4_32K_MODEL\n",
      "../sweepai/core/context_pruning.py IS_SELF_HOSTED\n",
      "../sweepai/core/context_pruning.py OPENAI_API_BASE\n",
      "../sweepai/core/context_pruning.py OPENAI_API_KEY\n",
      "../sweepai/core/context_pruning.py OPENAI_API_TYPE\n",
      "../sweepai/core/context_pruning.py OPENAI_API_VERSION\n",
      "../sweepai/core/context_pruning.py AssistantRaisedException\n",
      "../sweepai/core/context_pruning.py Snippet\n",
      "../sweepai/core/context_pruning.py file_cache\n",
      "../sweepai/core/context_pruning.py ChatLogger\n",
      "../sweepai/core/context_pruning.py discord_log_error\n",
      "../sweepai/core/context_pruning.py CodeTree\n",
      "../sweepai/core/context_pruning.py posthog\n",
      "../sweepai/core/context_pruning.py ClonedRepo\n",
      "../sweepai/core/context_pruning.py AssistantConversation\n",
      "../sweepai/core/context_pruning.py TicketProgress\n",
      "../sweepai/core/context_pruning.py DirectoryTree\n",
      "../sweepai/core/context_pruning.py os\n",
      "../sweepai/core/context_pruning.py prep_snippets\n",
      "Processing ../sweepai/core/repo_parsing_utils.py\n",
      "../sweepai/core/repo_parsing_utils.py glob\n",
      "../sweepai/core/repo_parsing_utils.py logging\n",
      "../sweepai/core/repo_parsing_utils.py multiprocessing\n",
      "../sweepai/core/repo_parsing_utils.py os\n",
      "../sweepai/core/repo_parsing_utils.py logger\n",
      "../sweepai/core/repo_parsing_utils.py tqdm\n",
      "../sweepai/core/repo_parsing_utils.py SweepConfig\n",
      "../sweepai/core/repo_parsing_utils.py Snippet\n",
      "../sweepai/core/repo_parsing_utils.py chunk_code\n",
      "Processing ../sweepai/core/prompts.py\n",
      "Processing ../sweepai/core/chat.py\n",
      "../sweepai/core/chat.py time\n",
      "../sweepai/core/chat.py traceback\n",
      "../sweepai/core/chat.py Any\n",
      "../sweepai/core/chat.py Literal\n",
      "../sweepai/core/chat.py backoff\n",
      "../sweepai/core/chat.py logger\n",
      "../sweepai/core/chat.py AsyncOpenAI\n",
      "../sweepai/core/chat.py BaseModel\n",
      "../sweepai/core/chat.py get_description\n",
      "../sweepai/core/chat.py DEFAULT_GPT4_32K_MODEL\n",
      "../sweepai/core/chat.py DEFAULT_GPT35_MODEL\n",
      "../sweepai/core/chat.py OPENAI_API_KEY\n",
      "../sweepai/core/chat.py OPENAI_USE_3_5_MODEL_ONLY\n",
      "../sweepai/core/chat.py Message\n",
      "../sweepai/core/chat.py repo_description_prefix_prompt\n",
      "../sweepai/core/chat.py system_message_prompt\n",
      "../sweepai/core/chat.py ChatLogger\n",
      "../sweepai/core/chat.py posthog\n",
      "../sweepai/core/chat.py ClonedRepo\n",
      "../sweepai/core/chat.py OpenAIProxy\n",
      "../sweepai/core/chat.py HumanMessagePrompt\n",
      "../sweepai/core/chat.py Tiktoken\n",
      "Processing ../sweepai/core/post_merge.py\n",
      "../sweepai/core/post_merge.py re\n",
      "../sweepai/core/post_merge.py traceback\n",
      "../sweepai/core/post_merge.py TypeVar\n",
      "../sweepai/core/post_merge.py DEFAULT_GPT4_32K_MODEL\n",
      "../sweepai/core/post_merge.py DEFAULT_GPT35_MODEL\n",
      "../sweepai/core/post_merge.py ChatGPT\n",
      "../sweepai/core/post_merge.py Message\n",
      "../sweepai/core/post_merge.py RegexMatchableBaseModel\n",
      "../sweepai/core/post_merge.py logger\n",
      "Processing ../sweepai/core/update_prompts.py\n",
      "Processing ../sweepai/core/pr_reader.py\n",
      "../sweepai/core/pr_reader.py re\n",
      "../sweepai/core/pr_reader.py islice\n",
      "../sweepai/core/pr_reader.py Repository\n",
      "../sweepai/core/pr_reader.py BaseModel\n",
      "../sweepai/core/pr_reader.py logger\n",
      "../sweepai/core/pr_reader.py discord_log_error\n",
      "Processing ../sweepai/core/lexical_search.py\n",
      "../sweepai/core/lexical_search.py multiprocessing\n",
      "../sweepai/core/lexical_search.py re\n",
      "../sweepai/core/lexical_search.py Counter\n",
      "../sweepai/core/lexical_search.py defaultdict\n",
      "../sweepai/core/lexical_search.py dataclass\n",
      "../sweepai/core/lexical_search.py log\n",
      "../sweepai/core/lexical_search.py logger\n",
      "../sweepai/core/lexical_search.py Redis\n",
      "../sweepai/core/lexical_search.py tqdm\n",
      "../sweepai/core/lexical_search.py DEBUG\n",
      "../sweepai/core/lexical_search.py REDIS_URL\n",
      "../sweepai/core/lexical_search.py Snippet\n",
      "../sweepai/core/lexical_search.py directory_to_chunks\n",
      "../sweepai/core/lexical_search.py get_query_texts_similarity\n",
      "../sweepai/core/lexical_search.py file_cache\n",
      "../sweepai/core/lexical_search.py TicketProgress\n",
      "Processing ../sweepai/core/vector_db.py\n",
      "../sweepai/core/vector_db.py json\n",
      "../sweepai/core/vector_db.py Generator\n",
      "../sweepai/core/vector_db.py backoff\n",
      "../sweepai/core/vector_db.py numpy\n",
      "../sweepai/core/vector_db.py logger\n",
      "../sweepai/core/vector_db.py OpenAI\n",
      "../sweepai/core/vector_db.py Redis\n",
      "../sweepai/core/vector_db.py tqdm\n",
      "../sweepai/core/vector_db.py BATCH_SIZE\n",
      "../sweepai/core/vector_db.py REDIS_URL\n",
      "../sweepai/core/vector_db.py file_cache\n",
      "../sweepai/core/vector_db.py hash_sha256\n",
      "../sweepai/core/vector_db.py Tiktoken\n",
      "Processing ../sweepai/core/entities.py\n",
      "../sweepai/core/entities.py annotations\n",
      "../sweepai/core/entities.py os\n",
      "../sweepai/core/entities.py re\n",
      "../sweepai/core/entities.py string\n",
      "../sweepai/core/entities.py uuid\n",
      "../sweepai/core/entities.py dataclass\n",
      "../sweepai/core/entities.py unified_diff\n",
      "../sweepai/core/entities.py Any\n",
      "../sweepai/core/entities.py ClassVar\n",
      "../sweepai/core/entities.py Literal\n",
      "../sweepai/core/entities.py Type\n",
      "../sweepai/core/entities.py TypeVar\n",
      "../sweepai/core/entities.py quote\n",
      "../sweepai/core/entities.py logger\n",
      "../sweepai/core/entities.py BaseModel\n",
      "../sweepai/core/entities.py Field\n",
      "../sweepai/core/entities.py blockquote\n",
      "../sweepai/core/entities.py clean_logs\n",
      "../sweepai/core/entities.py create_collapsible\n",
      "../sweepai/core/entities.py format_sandbox_success\n",
      "Processing ../sweepai/core/external_searcher.py\n",
      "../sweepai/core/external_searcher.py re\n",
      "../sweepai/core/external_searcher.py DEFAULT_GPT35_MODEL\n",
      "../sweepai/core/external_searcher.py ChatGPT\n",
      "../sweepai/core/external_searcher.py Message\n",
      "../sweepai/core/external_searcher.py external_search_prompt\n",
      "../sweepai/core/external_searcher.py external_search_system_prompt\n",
      "../sweepai/core/external_searcher.py logger\n",
      "../sweepai/core/external_searcher.py extract_info\n",
      "Processing ../sweepai/agents/pr_description_bot.py\n",
      "../sweepai/agents/pr_description_bot.py re\n",
      "../sweepai/agents/pr_description_bot.py DEFAULT_GPT35_MODEL\n",
      "../sweepai/agents/pr_description_bot.py ChatGPT\n",
      "Processing ../sweepai/agents/assistant_functions.py\n",
      "Processing ../sweepai/agents/complete_code_test.py\n",
      "../sweepai/agents/complete_code_test.py unittest\n",
      "../sweepai/agents/complete_code_test.py MagicMock\n",
      "../sweepai/agents/complete_code_test.py patch\n",
      "../sweepai/agents/complete_code_test.py ExtractLeftoverComments\n",
      "Processing ../sweepai/agents/prune_modify_snippets.py\n",
      "../sweepai/agents/prune_modify_snippets.py re\n",
      "../sweepai/agents/prune_modify_snippets.py logger\n",
      "../sweepai/agents/prune_modify_snippets.py ChatGPT\n",
      "../sweepai/agents/prune_modify_snippets.py Message\n",
      "../sweepai/agents/prune_modify_snippets.py RegexMatchableBaseModel\n",
      "Processing ../sweepai/agents/modify_file.py\n",
      "../sweepai/agents/modify_file.py traceback\n",
      "../sweepai/agents/modify_file.py OrderedDict\n",
      "../sweepai/agents/modify_file.py function_modify\n",
      "../sweepai/agents/modify_file.py FileChangeRequest\n",
      "../sweepai/agents/modify_file.py MaxTokensExceeded\n",
      "../sweepai/agents/modify_file.py Message\n",
      "../sweepai/agents/modify_file.py file_cache\n",
      "../sweepai/agents/modify_file.py ChatLogger\n",
      "../sweepai/agents/modify_file.py generate_diff\n",
      "../sweepai/agents/modify_file.py logger\n",
      "../sweepai/agents/modify_file.py ClonedRepo\n",
      "../sweepai/agents/modify_file.py MockClonedRepo\n",
      "../sweepai/agents/modify_file.py AssistantConversation\n",
      "../sweepai/agents/modify_file.py TicketProgress\n",
      "Processing ../sweepai/agents/assistant_wrapper.py\n",
      "../sweepai/agents/assistant_wrapper.py json\n",
      "../sweepai/agents/assistant_wrapper.py os\n",
      "../sweepai/agents/assistant_wrapper.py re\n",
      "../sweepai/agents/assistant_wrapper.py time\n",
      "../sweepai/agents/assistant_wrapper.py traceback\n",
      "../sweepai/agents/assistant_wrapper.py Path\n",
      "../sweepai/agents/assistant_wrapper.py Callable\n",
      "../sweepai/agents/assistant_wrapper.py logger\n",
      "../sweepai/agents/assistant_wrapper.py AzureOpenAI\n",
      "../sweepai/agents/assistant_wrapper.py OpenAI\n",
      "../sweepai/agents/assistant_wrapper.py SyncCursorPage\n",
      "../sweepai/agents/assistant_wrapper.py ThreadMessage\n",
      "../sweepai/agents/assistant_wrapper.py BaseModel\n",
      "../sweepai/agents/assistant_wrapper.py raise_error_schema\n",
      "../sweepai/agents/assistant_wrapper.py AZURE_API_KEY\n",
      "../sweepai/agents/assistant_wrapper.py AZURE_OPENAI_DEPLOYMENT\n",
      "../sweepai/agents/assistant_wrapper.py DEFAULT_GPT4_32K_MODEL\n",
      "../sweepai/agents/assistant_wrapper.py IS_SELF_HOSTED\n",
      "../sweepai/agents/assistant_wrapper.py OPENAI_API_BASE\n",
      "../sweepai/agents/assistant_wrapper.py OPENAI_API_KEY\n",
      "../sweepai/agents/assistant_wrapper.py OPENAI_API_TYPE\n",
      "../sweepai/agents/assistant_wrapper.py OPENAI_API_VERSION\n",
      "../sweepai/agents/assistant_wrapper.py AssistantRaisedException\n",
      "../sweepai/agents/assistant_wrapper.py Message\n",
      "../sweepai/agents/assistant_wrapper.py ChatLogger\n",
      "../sweepai/agents/assistant_wrapper.py posthog\n",
      "Processing ../sweepai/agents/complete_code.py\n",
      "../sweepai/agents/complete_code.py re\n",
      "../sweepai/agents/complete_code.py logger\n",
      "../sweepai/agents/complete_code.py ChatGPT\n",
      "../sweepai/agents/complete_code.py Message\n",
      "../sweepai/agents/complete_code.py RegexMatchableBaseModel\n",
      "../sweepai/agents/complete_code.py check_comments_presence\n",
      "Processing ../sweepai/agents/assistant_planning.py\n",
      "../sweepai/agents/assistant_planning.py copy\n",
      "../sweepai/agents/assistant_planning.py re\n",
      "../sweepai/agents/assistant_planning.py traceback\n",
      "../sweepai/agents/assistant_planning.py uuid\n",
      "../sweepai/agents/assistant_planning.py Path\n",
      "../sweepai/agents/assistant_planning.py logger\n",
      "../sweepai/agents/assistant_planning.py client\n",
      "../sweepai/agents/assistant_planning.py openai_assistant_call\n",
      "../sweepai/agents/assistant_planning.py run_until_complete\n",
      "../sweepai/agents/assistant_planning.py AssistantRaisedException\n",
      "../sweepai/agents/assistant_planning.py FileChangeRequest\n",
      "../sweepai/agents/assistant_planning.py Message\n",
      "../sweepai/agents/assistant_planning.py file_cache\n",
      "../sweepai/agents/assistant_planning.py ChatLogger\n",
      "../sweepai/agents/assistant_planning.py discord_log_error\n",
      "../sweepai/agents/assistant_planning.py AssistantConversation\n",
      "../sweepai/agents/assistant_planning.py TicketProgress\n",
      "Processing ../sweepai/agents/modify_bot.py\n",
      "../sweepai/agents/modify_bot.py os\n",
      "../sweepai/agents/modify_bot.py re\n",
      "../sweepai/agents/modify_bot.py dataclass\n",
      "../sweepai/agents/modify_bot.py excel_col_to_int\n",
      "../sweepai/agents/modify_bot.py function_modify\n",
      "../sweepai/agents/modify_bot.py int_to_excel_col\n",
      "../sweepai/agents/modify_bot.py ExtractLeftoverComments\n",
      "../sweepai/agents/modify_bot.py PruneModifySnippets\n",
      "../sweepai/agents/modify_bot.py ChatGPT\n",
      "../sweepai/agents/modify_bot.py FileChangeRequest\n",
      "../sweepai/agents/modify_bot.py Message\n",
      "../sweepai/agents/modify_bot.py Snippet\n",
      "../sweepai/agents/modify_bot.py UnneededEditError\n",
      "../sweepai/agents/modify_bot.py dont_use_chunking_message\n",
      "../sweepai/agents/modify_bot.py use_chunking_message\n",
      "../sweepai/agents/modify_bot.py update_snippets_prompt\n",
      "../sweepai/agents/modify_bot.py update_snippets_prompt_test\n",
      "../sweepai/agents/modify_bot.py update_snippets_system_prompt\n",
      "../sweepai/agents/modify_bot.py update_snippets_system_prompt_python\n",
      "../sweepai/agents/modify_bot.py add_auto_imports\n",
      "../sweepai/agents/modify_bot.py generate_diff\n",
      "../sweepai/agents/modify_bot.py sliding_window_replacement\n",
      "../sweepai/agents/modify_bot.py posthog\n",
      "../sweepai/agents/modify_bot.py ClonedRepo\n",
      "../sweepai/agents/modify_bot.py AssistantConversation\n",
      "../sweepai/agents/modify_bot.py TicketProgress\n",
      "../sweepai/agents/modify_bot.py chunk_code\n",
      "Processing ../sweepai/agents/assistant_function_modify.py\n",
      "../sweepai/agents/assistant_function_modify.py json\n",
      "../sweepai/agents/assistant_function_modify.py traceback\n",
      "../sweepai/agents/assistant_function_modify.py logger\n",
      "../sweepai/agents/assistant_function_modify.py keyword_search_schema\n",
      "../sweepai/agents/assistant_function_modify.py search_and_replace_schema\n",
      "../sweepai/agents/assistant_function_modify.py openai_assistant_call\n",
      "../sweepai/agents/assistant_function_modify.py AssistantRaisedException\n",
      "../sweepai/agents/assistant_function_modify.py Message\n",
      "../sweepai/agents/assistant_function_modify.py ChatLogger\n",
      "../sweepai/agents/assistant_function_modify.py discord_log_error\n",
      "../sweepai/agents/assistant_function_modify.py generate_diff\n",
      "../sweepai/agents/assistant_function_modify.py AssistantConversation\n",
      "../sweepai/agents/assistant_function_modify.py TicketProgress\n",
      "../sweepai/agents/assistant_function_modify.py check_code\n",
      "../sweepai/agents/assistant_function_modify.py chunk_code\n",
      "Processing ../sweepai/logn/__init__.py\n",
      "../sweepai/logn/__init__.py file_cache\n",
      "Processing ../sweepai/logn/logn.py\n",
      "Processing ../sweepai/logn/cache.py\n",
      "../sweepai/logn/cache.py hashlib\n",
      "../sweepai/logn/cache.py inspect\n",
      "../sweepai/logn/cache.py os\n",
      "../sweepai/logn/cache.py pickle\n",
      "../sweepai/logn/cache.py logger\n",
      "../sweepai/logn/cache.py DEBUG\n",
      "../sweepai/logn/cache.py GITHUB_BOT_USERNAME\n",
      "Processing ../sweepai/logn/trace_util.py\n",
      "../sweepai/logn/trace_util.py linecache\n",
      "../sweepai/logn/trace_util.py sys\n",
      "Processing ../sweepai/config/__init__.py\n",
      "Processing ../sweepai/config/client.py\n",
      "../sweepai/config/client.py annotations\n",
      "../sweepai/config/client.py os\n",
      "../sweepai/config/client.py traceback\n",
      "../sweepai/config/client.py lru_cache\n",
      "../sweepai/config/client.py yaml\n",
      "../sweepai/config/client.py Repository\n",
      "../sweepai/config/client.py logger\n",
      "../sweepai/config/client.py BaseModel\n",
      "../sweepai/config/client.py EmptyRepository\n",
      "Processing ../sweepai/config/server.py\n",
      "../sweepai/config/server.py base64\n",
      "../sweepai/config/server.py os\n",
      "../sweepai/config/server.py load_dotenv\n",
      "../sweepai/config/server.py logger\n",
      "Processing ../sweepai/utils/code_tree_test.py\n",
      "../sweepai/utils/code_tree_test.py unittest\n",
      "../sweepai/utils/code_tree_test.py CodeTree\n",
      "Processing ../sweepai/utils/ctags.py\n",
      "../sweepai/utils/ctags.py json\n",
      "../sweepai/utils/ctags.py subprocess\n",
      "../sweepai/utils/ctags.py dataclass\n",
      "../sweepai/utils/ctags.py Redis\n",
      "Processing ../sweepai/utils/event_logger.py\n",
      "../sweepai/utils/event_logger.py json\n",
      "../sweepai/utils/event_logger.py dataclass\n",
      "../sweepai/utils/event_logger.py datetime\n",
      "../sweepai/utils/event_logger.py requests\n",
      "../sweepai/utils/event_logger.py logger\n",
      "../sweepai/utils/event_logger.py ENV\n",
      "../sweepai/utils/event_logger.py LOKI_URL\n",
      "../sweepai/utils/event_logger.py POSTHOG_API_KEY\n",
      "Processing ../sweepai/utils/utils_test.py\n",
      "../sweepai/utils/utils_test.py pytest\n",
      "../sweepai/utils/utils_test.py check_syntax\n",
      "Processing ../sweepai/utils/__init__.py\n",
      "Processing ../sweepai/utils/openai_proxy.py\n",
      "../sweepai/utils/openai_proxy.py random\n",
      "../sweepai/utils/openai_proxy.py logger\n",
      "../sweepai/utils/openai_proxy.py AzureOpenAI\n",
      "../sweepai/utils/openai_proxy.py OpenAI\n",
      "../sweepai/utils/openai_proxy.py AZURE_API_KEY\n",
      "../sweepai/utils/openai_proxy.py BASERUN_API_KEY\n",
      "../sweepai/utils/openai_proxy.py MULTI_REGION_CONFIG\n",
      "../sweepai/utils/openai_proxy.py OPENAI_API_BASE\n",
      "../sweepai/utils/openai_proxy.py OPENAI_API_KEY\n",
      "../sweepai/utils/openai_proxy.py OPENAI_API_TYPE\n",
      "../sweepai/utils/openai_proxy.py OPENAI_API_VERSION\n",
      "../sweepai/utils/openai_proxy.py file_cache\n",
      "Processing ../sweepai/utils/comment_utils.py\n",
      "../sweepai/utils/comment_utils.py os\n",
      "../sweepai/utils/comment_utils.py re\n",
      "Processing ../sweepai/utils/buttons.py\n",
      "../sweepai/utils/buttons.py re\n",
      "../sweepai/utils/buttons.py List\n",
      "../sweepai/utils/buttons.py Changes\n",
      "Processing ../sweepai/utils/comment_utils_test.py\n",
      "../sweepai/utils/comment_utils_test.py unittest\n",
      "../sweepai/utils/comment_utils_test.py check_comments_presence\n",
      "Processing ../sweepai/utils/diff_test.py\n",
      "../sweepai/utils/diff_test.py unittest\n",
      "../sweepai/utils/diff_test.py patch\n",
      "../sweepai/utils/diff_test.py format_contents\n",
      "../sweepai/utils/diff_test.py is_markdown\n",
      "../sweepai/utils/diff_test.py match_string\n",
      "../sweepai/utils/diff_test.py revert_whitespace_changes\n",
      "Processing ../sweepai/utils/search_and_replace.py\n",
      "../sweepai/utils/search_and_replace.py re\n",
      "../sweepai/utils/search_and_replace.py dataclass\n",
      "../sweepai/utils/search_and_replace.py lru_cache\n",
      "../sweepai/utils/search_and_replace.py fuzz\n",
      "../sweepai/utils/search_and_replace.py tqdm\n",
      "../sweepai/utils/search_and_replace.py file_cache\n",
      "../sweepai/utils/search_and_replace.py logger\n",
      "Processing ../sweepai/utils/prompt_constructor.py\n",
      "../sweepai/utils/prompt_constructor.py BaseModel\n",
      "../sweepai/utils/prompt_constructor.py diff_section_prompt\n",
      "../sweepai/utils/prompt_constructor.py final_review_prompt\n",
      "../sweepai/utils/prompt_constructor.py human_message_prompt\n",
      "../sweepai/utils/prompt_constructor.py human_message_prompt_comment\n",
      "../sweepai/utils/prompt_constructor.py human_message_review_prompt\n",
      "Processing ../sweepai/utils/chat_logger.py\n",
      "../sweepai/utils/chat_logger.py json\n",
      "../sweepai/utils/chat_logger.py traceback\n",
      "../sweepai/utils/chat_logger.py datetime\n",
      "../sweepai/utils/chat_logger.py timedelta\n",
      "../sweepai/utils/chat_logger.py Thread\n",
      "../sweepai/utils/chat_logger.py Any\n",
      "../sweepai/utils/chat_logger.py requests\n",
      "../sweepai/utils/chat_logger.py logger\n",
      "../sweepai/utils/chat_logger.py BaseModel\n",
      "../sweepai/utils/chat_logger.py Field\n",
      "../sweepai/utils/chat_logger.py MongoClient\n",
      "../sweepai/utils/chat_logger.py DISCORD_LOW_PRIORITY_URL\n",
      "../sweepai/utils/chat_logger.py DISCORD_MEDIUM_PRIORITY_URL\n",
      "../sweepai/utils/chat_logger.py DISCORD_WEBHOOK_URL\n",
      "../sweepai/utils/chat_logger.py GITHUB_BOT_USERNAME\n",
      "../sweepai/utils/chat_logger.py IS_SELF_HOSTED\n",
      "../sweepai/utils/chat_logger.py MONGODB_URI\n",
      "../sweepai/utils/chat_logger.py global_threads\n",
      "Processing ../sweepai/utils/hash.py\n",
      "../sweepai/utils/hash.py hashlib\n",
      "Processing ../sweepai/utils/autoimport.py\n",
      "../sweepai/utils/autoimport.py os\n",
      "../sweepai/utils/autoimport.py StringIO\n",
      "../sweepai/utils/autoimport.py isort\n",
      "../sweepai/utils/autoimport.py index\n",
      "../sweepai/utils/autoimport.py logger\n",
      "../sweepai/utils/autoimport.py check\n",
      "../sweepai/utils/autoimport.py Reporter\n",
      "../sweepai/utils/autoimport.py discord_log_error\n",
      "Processing ../sweepai/utils/search_and_replace_test.py\n",
      "../sweepai/utils/search_and_replace_test.py unittest\n",
      "../sweepai/utils/search_and_replace_test.py Match\n",
      "../sweepai/utils/search_and_replace_test.py find_best_match\n",
      "../sweepai/utils/search_and_replace_test.py get_max_indent\n",
      "../sweepai/utils/search_and_replace_test.py line_cost\n",
      "../sweepai/utils/search_and_replace_test.py match_without_whitespace\n",
      "../sweepai/utils/search_and_replace_test.py score_line\n",
      "../sweepai/utils/search_and_replace_test.py score_multiline\n",
      "../sweepai/utils/search_and_replace_test.py split_ellipses\n",
      "Processing ../sweepai/utils/diff.py\n",
      "../sweepai/utils/diff.py difflib\n",
      "../sweepai/utils/diff.py re\n",
      "../sweepai/utils/diff.py logger\n",
      "../sweepai/utils/diff.py Match\n",
      "../sweepai/utils/diff.py find_best_match\n",
      "Processing ../sweepai/utils/user_settings.py\n",
      "../sweepai/utils/user_settings.py traceback\n",
      "../sweepai/utils/user_settings.py resend\n",
      "../sweepai/utils/user_settings.py Github\n",
      "../sweepai/utils/user_settings.py AppAuthentication\n",
      "../sweepai/utils/user_settings.py BaseModel\n",
      "../sweepai/utils/user_settings.py GITHUB_APP_ID\n",
      "../sweepai/utils/user_settings.py GITHUB_APP_PEM\n",
      "../sweepai/utils/user_settings.py IS_SELF_HOSTED\n",
      "../sweepai/utils/user_settings.py PROGRESS_BASE_URL\n",
      "../sweepai/utils/user_settings.py RESEND_API_KEY\n",
      "../sweepai/utils/user_settings.py discord_log_error\n",
      "../sweepai/utils/user_settings.py global_mongo_client\n",
      "../sweepai/utils/user_settings.py get_installation_id\n",
      "Processing ../sweepai/utils/openai_proxy_test.py\n",
      "../sweepai/utils/openai_proxy_test.py unittest\n",
      "../sweepai/utils/openai_proxy_test.py MagicMock\n",
      "../sweepai/utils/openai_proxy_test.py PropertyMock\n",
      "../sweepai/utils/openai_proxy_test.py patch\n",
      "../sweepai/utils/openai_proxy_test.py OPENAI_API_ENGINE_GPT35\n",
      "../sweepai/utils/openai_proxy_test.py OpenAIProxy\n",
      "Processing ../sweepai/utils/regex_utils.py\n",
      "../sweepai/utils/regex_utils.py re\n",
      "Processing ../sweepai/utils/utils.py\n",
      "../sweepai/utils/utils.py annotations\n",
      "../sweepai/utils/utils.py ast\n",
      "../sweepai/utils/utils.py os\n",
      "../sweepai/utils/utils.py re\n",
      "../sweepai/utils/utils.py traceback\n",
      "../sweepai/utils/utils.py uuid\n",
      "../sweepai/utils/utils.py dataclass\n",
      "../sweepai/utils/utils.py StringIO\n",
      "../sweepai/utils/utils.py Optional\n",
      "../sweepai/utils/utils.py tiktoken\n",
      "../sweepai/utils/utils.py logger\n",
      "../sweepai/utils/utils.py Run\n",
      "../sweepai/utils/utils.py TextReporter\n",
      "../sweepai/utils/utils.py Node\n",
      "../sweepai/utils/utils.py get_parser\n",
      "../sweepai/utils/utils.py Snippet\n",
      "../sweepai/utils/utils.py file_cache\n",
      "../sweepai/utils/utils.py discord_log_error\n",
      "Processing ../sweepai/utils/tree_utils.py\n",
      "../sweepai/utils/tree_utils.py copy\n",
      "../sweepai/utils/tree_utils.py logger\n",
      "../sweepai/utils/tree_utils.py file_cache\n",
      "Processing ../sweepai/utils/github_utils.py\n",
      "../sweepai/utils/github_utils.py datetime\n",
      "../sweepai/utils/github_utils.py difflib\n",
      "../sweepai/utils/github_utils.py hashlib\n",
      "../sweepai/utils/github_utils.py os\n",
      "../sweepai/utils/github_utils.py re\n",
      "../sweepai/utils/github_utils.py shutil\n",
      "../sweepai/utils/github_utils.py subprocess\n",
      "../sweepai/utils/github_utils.py time\n",
      "../sweepai/utils/github_utils.py traceback\n",
      "../sweepai/utils/github_utils.py dataclass\n",
      "../sweepai/utils/github_utils.py cached_property\n",
      "../sweepai/utils/github_utils.py Any\n",
      "../sweepai/utils/github_utils.py git\n",
      "../sweepai/utils/github_utils.py requests\n",
      "../sweepai/utils/github_utils.py Github\n",
      "../sweepai/utils/github_utils.py encode\n",
      "../sweepai/utils/github_utils.py logger\n",
      "../sweepai/utils/github_utils.py SweepConfig\n",
      "../sweepai/utils/github_utils.py GITHUB_APP_ID\n",
      "../sweepai/utils/github_utils.py GITHUB_APP_PEM\n",
      "../sweepai/utils/github_utils.py CTags\n",
      "../sweepai/utils/github_utils.py DirectoryTree\n",
      "../sweepai/utils/github_utils.py remove_all_not_included\n",
      "../sweepai/utils/github_utils.py ratio\n",
      "Processing ../sweepai/utils/scorer_test.py\n",
      "../sweepai/utils/scorer_test.py get_scores\n",
      "Processing ../sweepai/utils/progress.py\n",
      "../sweepai/utils/progress.py annotations\n",
      "../sweepai/utils/progress.py time\n",
      "../sweepai/utils/progress.py Enum\n",
      "../sweepai/utils/progress.py Thread\n",
      "../sweepai/utils/progress.py OpenAI\n",
      "../sweepai/utils/progress.py CodeToolCall\n",
      "../sweepai/utils/progress.py FunctionToolCall\n",
      "../sweepai/utils/progress.py ThreadMessage\n",
      "../sweepai/utils/progress.py BaseModel\n",
      "../sweepai/utils/progress.py Field\n",
      "../sweepai/utils/progress.py MONGODB_URI\n",
      "../sweepai/utils/progress.py OPENAI_API_KEY\n",
      "../sweepai/utils/progress.py FileChangeRequest\n",
      "../sweepai/utils/progress.py Snippet\n",
      "../sweepai/utils/progress.py global_threads\n",
      "../sweepai/utils/progress.py discord_log_error\n",
      "../sweepai/utils/progress.py global_mongo_client\n",
      "Processing ../sweepai/utils/progress_test.py\n",
      "../sweepai/utils/progress_test.py patch\n",
      "../sweepai/utils/progress_test.py create_index\n",
      "Processing ../sweepai/utils/code_tree.py\n",
      "../sweepai/utils/code_tree.py ast\n",
      "../sweepai/utils/code_tree.py re\n",
      "../sweepai/utils/code_tree.py tree_sitter_languages\n",
      "../sweepai/utils/code_tree.py BaseModel\n",
      "../sweepai/utils/code_tree.py Node\n",
      "../sweepai/utils/code_tree.py Parser\n",
      "../sweepai/utils/code_tree.py Tree\n",
      "Processing ../sweepai/utils/github_utils_test.py\n",
      "../sweepai/utils/github_utils_test.py unittest\n",
      "../sweepai/utils/github_utils_test.py Mock\n",
      "../sweepai/utils/github_utils_test.py patch\n",
      "../sweepai/utils/github_utils_test.py ClonedRepo\n",
      "Processing ../sweepai/utils/scorer.py\n",
      "../sweepai/utils/scorer.py datetime\n",
      "Processing ../sweepai/utils/patch_utils.py\n",
      "../sweepai/utils/patch_utils.py re\n",
      "Processing ../sweepai/utils/docker_utils.py\n",
      "../sweepai/utils/docker_utils.py urllib\n",
      "../sweepai/utils/docker_utils.py datetime\n",
      "../sweepai/utils/docker_utils.py timedelta\n",
      "../sweepai/utils/docker_utils.py timezone\n",
      "../sweepai/utils/docker_utils.py requests\n",
      "Processing ../sweepai/utils/html_extractor.py\n",
      "../sweepai/utils/html_extractor.py re\n",
      "../sweepai/utils/html_extractor.py requests\n",
      "../sweepai/utils/html_extractor.py BeautifulSoup\n",
      "Processing ../sweepai/utils/ticket_utils.py\n",
      "../sweepai/utils/ticket_utils.py traceback\n",
      "../sweepai/utils/ticket_utils.py time\n",
      "../sweepai/utils/ticket_utils.py logger\n",
      "../sweepai/utils/ticket_utils.py SweepConfig\n",
      "../sweepai/utils/ticket_utils.py RepoContextManager\n",
      "../sweepai/utils/ticket_utils.py get_relevant_context\n",
      "../sweepai/utils/ticket_utils.py compute_vector_search_scores\n",
      "../sweepai/utils/ticket_utils.py prepare_lexical_search_index\n",
      "../sweepai/utils/ticket_utils.py search_index\n",
      "../sweepai/utils/ticket_utils.py file_cache\n",
      "../sweepai/utils/ticket_utils.py discord_log_error\n",
      "../sweepai/utils/ticket_utils.py posthog\n",
      "../sweepai/utils/ticket_utils.py ClonedRepo\n",
      "../sweepai/utils/ticket_utils.py TicketProgress\n",
      "Processing ../sweepai/utils/str_utils.py\n",
      "../sweepai/utils/str_utils.py hashlib\n",
      "../sweepai/utils/str_utils.py re\n",
      "../sweepai/utils/str_utils.py time\n",
      "../sweepai/utils/str_utils.py PROGRESS_BASE_URL\n",
      "Processing ../sweepai/utils/safe_pqueue.py\n",
      "../sweepai/utils/safe_pqueue.py queue\n",
      "../sweepai/utils/safe_pqueue.py threading\n",
      "Processing ../sweepai/utils/docker_utils_test.py\n",
      "../sweepai/utils/docker_utils_test.py unittest\n",
      "../sweepai/utils/docker_utils_test.py get_latest_docker_version\n",
      "Processing ../sweepai/utils/buttons_test.py\n",
      "../sweepai/utils/buttons_test.py unittest\n",
      "../sweepai/utils/buttons_test.py unittest\n",
      "../sweepai/utils/buttons_test.py Button\n",
      "../sweepai/utils/buttons_test.py ButtonList\n",
      "../sweepai/utils/buttons_test.py check_button_activated\n",
      "../sweepai/utils/buttons_test.py check_button_title_match\n",
      "../sweepai/utils/buttons_test.py create_action_buttons\n",
      "../sweepai/utils/buttons_test.py create_button\n",
      "../sweepai/utils/buttons_test.py get_toggled_state\n",
      "Processing ../sweepai/web/events.py\n",
      "../sweepai/web/events.py Any\n",
      "../sweepai/web/events.py Dict\n",
      "../sweepai/web/events.py Literal\n",
      "../sweepai/web/events.py BaseModel\n",
      "Processing ../sweepai/web/health.py\n",
      "../sweepai/web/health.py psutil\n",
      "../sweepai/web/health.py redis\n",
      "../sweepai/web/health.py FastAPI\n",
      "../sweepai/web/health.py JSONResponse\n",
      "../sweepai/web/health.py logger\n",
      "../sweepai/web/health.py MongoClient\n",
      "../sweepai/web/health.py IS_SELF_HOSTED\n",
      "../sweepai/web/health.py MONGODB_URI\n",
      "../sweepai/web/health.py REDIS_URL\n",
      "Processing ../sweepai/web/health_test.py\n",
      "../sweepai/web/health_test.py unittest\n",
      "../sweepai/web/health_test.py patch\n",
      "../sweepai/web/health_test.py TestClient\n",
      "../sweepai/web/health_test.py app\n",
      "../sweepai/web/health_test.py check_mongodb_health\n",
      "../sweepai/web/health_test.py check_redis_health\n",
      "../sweepai/web/health_test.py check_sandbox_health\n",
      "DiGraph with 530 nodes and 933 edges\n"
     ]
    }
   ],
   "source": [
    "import ast\n",
    "import os\n",
    "import networkx as nx\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# Initialize a directed graph\n",
    "G = nx.DiGraph()\n",
    "\n",
    "# Function to process a single file\n",
    "def process_file(file_path):\n",
    "    print(f\"Processing {file_path}\")\n",
    "    with open(file_path, 'r') as file:\n",
    "        node = os.path.basename(file_path)  # Use file name as node\n",
    "        G.add_node(node)\n",
    "        \n",
    "        try:\n",
    "            tree = ast.parse(file.read(), filename=file_path)\n",
    "            for node in ast.walk(tree):\n",
    "                if isinstance(node, (ast.Import, ast.ImportFrom)):\n",
    "                    for alias in node.names:\n",
    "                        imported_module = alias.name.split('.')[0]  # Simplify module name\n",
    "                        G.add_edge(file_path, imported_module)  # Add an edge from this file to the imported module\n",
    "                        print(file_path, imported_module)\n",
    "        except SyntaxError as e:\n",
    "            print(f\"Syntax error in {file_path}: {e}\")\n",
    "\n",
    "# Function to traverse the directory and process each Python file\n",
    "def process_directory(directory_path):\n",
    "    for root, dirs, files in os.walk(directory_path):\n",
    "        for file in files:\n",
    "            if file.endswith('.py'):\n",
    "                process_file(os.path.join(root, file))\n",
    "\n",
    "# Example: Process a directory named 'your_codebase_directory'\n",
    "process_directory('../sweepai')\n",
    "\n",
    "print(G)\n",
    "\n",
    "# # Drawing the graph\n",
    "# plt.figure(figsize=(12, 12))\n",
    "# nx.draw(G, with_labels=True, node_size=2000, node_color=\"lightblue\", font_size=10, font_weight=\"bold\")\n",
    "# plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "sweepai-u_CIt3kb-py3.11",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
